package com.hmall.search;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author Mr_Su
 * @version v1.0
 * @date 2022/6/20 17:05
 * @desciption
 */
@SpringBootApplication
public class SearchAppApplication {
    public static void main(String[] args) {
        SpringApplication.run(SearchAppApplication.class, args);
    }

    @Bean
    public RestHighLevelClient restHighLevelClient(){
        return new RestHighLevelClient(
                RestClient.builder(
                        new HttpHost("192.168.200.131",9200,"http")));
    }
}
